#pragma once

#include <QItemDelegate>
#include <QLineEdit>
#include "foodModel.h"
#include <QDoubleSpinBox>

class FoodDelegate  : public QItemDelegate
{
	Q_OBJECT

public:
	FoodDelegate(QObject *parent);
	~FoodDelegate();


	virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
	virtual void setEditorData(QWidget* editor, const QModelIndex& index) const;
	virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;

	virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;



};
